﻿using System;
using System.Collections.Generic;
using Gameplay.PVE.Utils;
using RootMotion.FinalIK;
using UnityEngine;
using Yoozoo.Libs;

namespace Gameplay.PVE.Survivor
{
    public abstract class ComponentBase : IClass
    {
        protected BattleUnit unit;
        public void Initialize(BattleUnit unit)
        {
            this.unit = unit;
            OnInitialized();
        }

        protected abstract void OnInitialized();

        public void Update()
        {
            OnUpdate();
        }

        protected abstract void OnUpdate();
        public virtual void LateUpdate()
        {
            
        }

        public void Dead()
        {
            OnDead();
        }

        protected virtual void OnDead()
        {
            
        }

        public virtual void OnReset()
        {
            
        }
    }
}
